package io;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "cxk";
        int  age  = 1245;
        String gender = "男";
        String[] otherInfo = {"唱","跳","rap","篮球","music"};
        Person p = new Person(name,age,gender,otherInfo);
        System.out.println(p);
        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(p);
        System.out.println("完毕");
        oos.close();

    }



}
